﻿@model List<MyBlog2.Models.Tag>
@{
    ViewData["Title"] = "标签管理";
    Layout = "~/Areas/Admin/Views/Shared/_AdminLayout.cshtml";
}

<h1>标签管理</h1>
<br />
<!-- 表格 -->
<div class="table-responsive">
    <table class="table table-bordered table-hover">
        <thead class="thead-light">
            <tr>
                <th scope="col">序号</th>
                <th scope="col">名称</th>
                <th scope="col">操作</th>
            </tr>
        </thead>
        <tbody>
            @for (int i = 0; i < Model.Count; i++)
            {
                <tr>
                    <th scope="row">@(i+1)</th>
                    <td>@Model[i].Name</td>
                    <td>
                        <a class="btn btn-info" asp-route="EditTag" asp-route-id="@Model[i].Id">编辑</a>

                        <a class="btn btn-danger" asp-route="DeleteTag" asp-route-id="@Model[i].Id">删除</a>
                    </td>
                </tr>
            }
        </tbody>
        <caption>
            <a class="btn btn-primary" style="float: right;" asp-route="AddTag">添加</a>
        </caption>
    </table>
</div>

